package com.easy.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.text.SimpleDateFormat;
import java.util.Date;
@Data
public class FosterBookingBean {
    private  String foster_booking_user_name;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date foster_booking_date;
    private String foster_booking_pet;
    private Integer id;
    private String state;

    public String adopt_booking_date() {
        if(foster_booking_date==null) return null;
        return new SimpleDateFormat("YYYY-MM-dd").format(foster_booking_date);
    }
}
